# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=unity-api-git
_pkgname=unity-api
pkgver=r1104.d74beb0
pkgrel=1
pkgdesc='API for Unity shell integration'
url='https://github.com/ubports/unity-api'
arch=(x86_64 i686 armv7h aarch64)
license=(LGPL3)
conflicts=(unity-api)
provides=(unity-api)
depends=(qt5-quickcontrols)
makedepends=(git cmake cppcheck graphviz libqtdbustest-git cmake-extras-git)
source=('git+https://github.com/ubports/unity-api.git#branch=bionic')
sha256sums=('SKIP')

BUILDENV+=('!check') # Some tests are broken

pkgver() {
  cd ${_pkgname}
  echo "r$(git rev-list --count HEAD).$(git describe --always)"
}

build() {
  cd ${_pkgname}
  mkdir -p build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR="lib/" ..
  make
}

check() {
  cd ${_pkgname}/build
  make ARGS+="--output-on-failure" test
}

package() {
  cd ${_pkgname}/build
  make DESTDIR="${pkgdir}/" install
}
# vim:set ts=2 sw=2 et:
